package com.example.librarysystem.Service;

import com.example.librarysystem.entity.Comment;
import com.example.librarysystem.entity.CommentInfo;

import java.util.List;

public interface CommentService {
    Integer selectCount();
    Integer selectCountByBookName(String bookName);
    List<Comment> selectByBookName(String bookName);
    List<Comment> selectByBorrowerName(String borrowerName);
    Comment selectCommentById(int id);
    List<CommentInfo> selectCommentInfo(int borrowerId, int currentPage, int pageSize);
    List<CommentInfo> selectCommentInfoSearch(int borrowerId, String bookName, String author, String publishingHouse, int currentPage, int pageSize);
    int deleteCommentById(int id, int score2delete, String bookName);
    int updateCommentById(int id, Comment comment, int score2update);
    Comment selectCommentByBookAndBorrower(String bookName, int borrowerId);
    int selectExist(String bookName, int borrowerId);
    int insertComment(Comment comment);
    int selectCommentInfoCount(int borrowerId);
    int selectCommentInfoSearchCount(int borrowerId, String bookName, String author, String publishingHouse);
    List<Comment> selectAll(int currentPage, int pageSize);
}
